﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ShopOnline.BLL;

namespace ShopOnline.Controls
{
    public partial class BusinessCardList : BaseRepeater
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnDelete_OnClick(object sender, EventArgs e)
        {
            LinkButton lnk = (LinkButton)sender;
            int id = int.Parse(lnk.Attributes["ItemID"]);

            BusinessCards bc = new BusinessCards();
            bc.LoadByPrimaryKey(id);
            bc.MarkAsDeleted();
            bc.Save();

            this.Rebind();
        }

        bool readOnly = true;

        public bool ReadOnly
        {
            get { return readOnly; }
            set { readOnly = value; }
        }
    }
}